function setHeight(obj) {

	var iframe = document.getElementById(obj);
	if (iframe) {
		var bheight = iframe.contentWindow.document.body.scrollHeight;
		var dheight = iframe.contentWindow.document.documentElement.scrollHeight;
		var height = Math.max(bheight, dheight);
		iframe.height = height + 1;
	}
}
function getMonth(obj) {
	if (obj.value == null || obj.value == '') {
		return;
	}
	var tempdates = obj.value.split('-');
	obj.value = tempdates[0] + '-' + tempdates[1];
}
function wopen(obj) {
	window.open(obj, '',
			'width=800px,height=600px,resizable = yes ,scrollbars=yes');
}
function wopen(obj, w, h) {
	if (w == '') {
		w = 800;
	}
	if (h == '') {
		h = 600;
	}
	window.open(obj, '', 'width=' + w + 'px,height=' + h
			+ 'px,resizable = yes ,scrollbars=yes');
}
/**
 * 内部隐含参数 4 1。 oid 业务的OID 2。 userOId 当前登录人的OID 3。 processInsId 流程ID 4。
 * workitemid 工作项ID 5。 上传后台处理参数 1 23
 * 
 * @param id
 *            需要处理 表格的ID
 * @return
 */
function uploadFile(id, type) {
	var params = "";
	var businessOid = document.getElementById("oid").value;
	var userOid = document.getElementById("curUserOid").value;
	var processInsId = document.getElementById("processInsId").value;
	var workitemid = document.getElementById("workitemid").value;
	params = businessOid + "_" + userOid + "_" + processInsId + "_"
			+ workitemid + "_2";
	var url = WEB_APP_PATH + '/upload/include.jsp?param=' + params
			+ '&divFileList=' + id + '&type=' + type;
	window.open(url, '',
			'width=650px,height=400px,resizable = yes ,scrollbars=yes');
}
function uploadFileForNomarl(params, id) {
	var url = WEB_APP_PATH + '/upload/include.jsp?param=' + params
			+ '&divFileList=' + id;
	window.open(url, '',
			'width=650px,height=400px,resizable = yes ,scrollbars=yes');
}
function downLoadForNomarl(params, id) {
	var url = WEB_APP_PATH + '/upload/attachelist.jsp?param='
			+ params + '&divFileList=' + id;
	window.open(url, '',
			'width=650px,height=400px,resizable = yes ,scrollbars=yes');
}